package com.dwxt.sport.controller;

import com.dwxt.common.base.BaseResult;
import com.dwxt.sport.admin.service.DeviceServiceAdmin;
import com.dwxt.sport.business.entity.DictValue;
import com.dwxt.sport.entity.WifeDevice;
import com.dwxt.sport.service.WifeDeviceService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/admin")
public class DeviceAllPeoPleController {

    @Autowired
    private WifeDeviceService wifeDeviceService;

    @PostMapping("/selectDevicesBySceneId")
    @ApiOperation(value = "根据场景id查询设备详情", notes = "根据场景id查询设备详情", response = BaseResult.class)
    public BaseResult selectDevicesBySceneId(String id) {
        List<WifeDevice> wifeDeviceList = wifeDeviceService.selectDevicesBySceneId(id);
        return BaseResult.ok(wifeDeviceList);
    }
}
